import { Injectable, EventEmitter } from '@angular/core';

@Injectable()
export class LoaderEmitter {

    private emitter: EventEmitter<any>;

    private _totalRequests = 0;

    public get totalRequests(): number {
        return this._totalRequests;
    }

    public set totalRequests(v: number) {
        this._totalRequests = v;
    }



    constructor() {
        this.emitter = new EventEmitter<any>();
    }

    getEmitter(): EventEmitter<any> {
        return this.emitter;
    }

    emit(data: any): void {
        this.emitter.emit(data);
    }

}
